import { Vector3, Curve } from "three";

//路径
export default class CustomSinCurve extends Curve<Vector3> {
    constructor() {
        super();
    }
    getPoint(t: number, optionalTarget?: Vector3 | undefined): Vector3 {
        const a = t * 5 + 1;
        const ty = (a * Math.cos(t * Math.PI * 2 * 4)) / 8;
        const tz = (a * Math.sin(t * Math.PI * 2 * 4)) / 8;
        return new Vector3(t, ty, tz);
    }
}